package com.zenithmind.chat.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zenithmind.chat.mapper.ModelMapper;
import com.zenithmind.chat.pojo.entity.ModelConfig;
import com.zenithmind.chat.service.ModelService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ModelServiceImpl extends ServiceImpl<ModelMapper, ModelConfig> implements ModelService {
    
    @Override
    public List<ModelConfig> getAvailableModels() {
        LambdaQueryWrapper<ModelConfig> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(ModelConfig::getEnabled, 1); 
        return this.list(wrapper);
    }
    
    @Override
    public ModelConfig getModelById(String id) {
        return this.getById(id);
    }
} 